// UndoCommand.h: interface for the UndoCommand class.
//
//////////////////////////////////////////////////////////////////////

#if !defined(AFX_UNDOCOMMAND_H__A409DC20_47F1_4A9E_B611_6E44E1328461__INCLUDED_)
#define AFX_UNDOCOMMAND_H__A409DC20_47F1_4A9E_B611_6E44E1328461__INCLUDED_

#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000

#include "CommandObject.h"

class DllExport UndoCommand : public CommandObject 
{
protected:
	typedef BOOL (UndoCommand::*UNDOPROC)();

public:
	UndoCommand();
	virtual ~UndoCommand();

public:
	BOOL UndoExecute(){
		if(m_pProc == NULL)
			return TRUE;
		return (this->*m_pProc)();
	}

protected:
	void SetState(UNDOPROC pProc){
		m_pProc = pProc;
	}

private:
	UNDOPROC m_pProc;
};

#endif // !defined(AFX_UNDOCOMMAND_H__A409DC20_47F1_4A9E_B611_6E44E1328461__INCLUDED_)
